package com.ityun.ogapp.dialog

import android.app.Dialog
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.Window
import com.ityun.ogapp.base.BaseDialogFragment
import com.ityun.ogapp.databinding.DialogAddContactFragmentBinding

class AddContactDialogFragment  : BaseDialogFragment() {
    private var mBinding: DialogAddContactFragmentBinding? = null

    companion object {
        fun newInstance(): AddContactDialogFragment {
            val fragment = AddContactDialogFragment()
            return fragment
        }
    }

    override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
        val dialog = super.onCreateDialog(savedInstanceState)
        // 去掉标题栏
        dialog.window?.requestFeature(Window.FEATURE_NO_TITLE)
        return dialog
    }

    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        mBinding = DialogAddContactFragmentBinding.inflate(inflater, container, false)
        return mBinding!!.root
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        setupViews()
    }

    private fun setupViews() {
//        // 设置标题和内容
//        arguments?.let {
//            mBinding.tvTitle.text = it.getString("title", "")
//            mBinding.tvMessage.text = it.getString("message", "")
//        }

//        // 设置按钮点击事件
//        binding.btnConfirm.setOnClickListener {
//            // 处理确认按钮点击
//            dismiss()
//        }
//
//        binding.btnCancel.setOnClickListener {
//            // 处理取消按钮点击
//            dismiss()
//        }
    }


}